
<nav class="navbar navbar-default">
	<div class="container">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed"
				data-toggle="collapse" data-target="#navbar" aria-expanded="false"
				aria-controls="navbar">
				<span class="sr-only">Toggle navigation</span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
		</div>
		<div id="navbar" class="navbar-collapse collapse">
			<ul class="nav navbar-nav">
				<li><a th:href="${urls.currentUrl}">主页</a></li>
				<li><a th:href="${urls.currentUrl+'/archives'}">文章归档</a></li>
				<li th:if="${user != null}"><a
					th:href="${urls.url+'/mgr/article/index'}">管理台</a></li>
				<li th:if="${user == null}"><a th:href="${urls.url+'/login'}">登录</a></li>
			</ul>

			<form class="navbar-form navbar-right" th:action="${urls.currentUrl}"
				method="get" role="form" id="navSearchForm">
				<div class="input-group">
					<input type="text" class="form-control" name="query"
						placeholder="文章搜索" aria-describedby="basic-addon2"> <span
						class="input-group-addon" id="basic-addon2"><a href="###"
						onclick="document.getElementById('navSearchForm').submit()"> <span
							class="glyphicon glyphicon-search" aria-hidden="true"></span>
					</a></span>
				</div>
			</form>
			<ul class="nav navbar-nav navbar-right">
				<li><a th:href="${urls.url}">网站主页</a></li>
			</ul>
		</div>
	</div>
</nav>